﻿<%@ WebHandler Language="C#" Debug="true"  Class="login" %>

using System;
using System.Web;
using System.Net;
using System.Data;
using System.Data.SqlClient;
using System.Data.SqlTypes;
using Jungle.Code.DAL;
using Jungle.Code.Utils;
using Jungle.Code.BLL;
using Jungle.Code.Core;
using System.IO;
using System.Text;
using System.Security.Cryptography;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.SessionState;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Collections;
using System.Configuration;
using System.Collections.Generic;
using System.Text;
using System.Security.Cryptography;

using Jungle.Users;

public class login : IHttpHandler, IRequiresSessionState  
{
    public string status;
    public Byte[] ByteArr;
    public void ProcessRequest (HttpContext context) {

        StreamReader stream_cap = new StreamReader(context.Request.InputStream);
        string inStream = stream_cap.ReadToEnd();
        status = "bad";
        UserManager um = new UserManager();
        um.Email = inStream;
        if (um.CheckEmail()) status = "ok";

        context.Response.Write(status);
       
    }   
    public bool IsReusable {
        get {
            return false;
        }
    }   
}